<?php include('./templete/public/head.php')?>
<body>
<hr class="bgcolor" />
<!--评估-->
<div class="assess-main">
    <div class="assess-content ">
        <form class="myform">
            <div class="c-top">
                <ul class="comm-table-view">
                    <li class="table-view-cell table-view-cell2">
                        <a>
                            <span>评估事项</span>
                            <div class="top-text text1">
                                <?php echo $rows['problem_content']?>
                            </div>
                        </a>
                    </li>
                    <li class="table-view-cell table-view-cell2">
                        <a>
                            <span>评语</span>
                            <div class="top-text text2">
                                <textarea name="class_reason"><?php echo $rows['class_reason']?></textarea>
                            </div>
                        </a>
                    </li>
                </ul>
            </div>
            <hr class="bgcolor" />
            <input type="hidden" name="id" value="<?php echo $rows['id']?>">
        </form>
        <div class="comm-btn assess-btn">
            <span class="color1 adopt">采纳</span>
            <span class="color2 unadopt">不采纳</span>
        </div>
    </div>
</div>
<script src="_js/plug/mui.picker.all.js"></script>
<?php include('./templete/public/script.php')?>
</body>
<script>
    mui.init({
        swipeBack: true //启用右滑关闭功能
    });
    //采纳
    $('.adopt').click(function () {
        var param =$('.myform').serializeArray();
        let loading = layer.load(0, {shade: false}); //0代表加载的风格，支持0-2
        $.ajax({
            url:'<?php echo url('jdz/class_adopt',['do'=>1])?>',
            data:param,
            type:'post',
            success:function (data) {
                layer.closeAll();
                if(data.code==1){
                    layer.msg(data.msg);
                   // setTimeout(function () {
                        location.href = '/index/jdz/detail/id/'+'<?php echo $rows['id']?>';
                   // },1000)
                }else{
                    layer.msg(data.msg);
                }
            }
        })
    });
    $('.unadopt').click(function () {
        var param =$('.myform').serializeArray();
        let loading = layer.load(0, {shade: false}); //0代表加载的风格，支持0-2
        $.ajax({
            url:'<?php echo url('jdz/class_adopt',['do'=>2])?>',
            data:param,
            type:'post',
            success:function (data) {
                layer.closeAll();
                if(data.code==1){
                    layer.msg(data.msg);
                    setTimeout(function () {
                        location.href = '/index/jdz/detail/id/'+'<?php echo $rows['id']?>';
                    },1000)
                }else{
                    layer.msg(data.msg);
                }
            }
        })
    })

</script>

</html>